﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CrossWord.aspx.cs" Inherits="SQT.tracnghiem.Ajax.ASP.Game.CrossWord" %>
<%@ Import Namespace="DataAccess" %>
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<body>
    <%
        var get_crossword = from p in new TblCrossWordQuestionController().FetchAll() orderby p.Id descending select p;
    %>
    <div id="ochu" class="game-content w3-row">
        <div class="game-left w3-third w3-border-right w3-border-teal">
            <header class="w3-center w3-padding-4">
                <label>Danh sách câu hỏi</label>
            </header>
            <div class="w3-padding">
                <ul id="game-question-list" class="game-question-list w3-ul w3-light-grey">
                    <%foreach (TblCrossWordQuestion crossword in get_crossword) { %>
                    <li onclick="crossword_edit(<%=crossword.Id %>)"><%=crossword.Name %></li>
                    <%} %>
                </ul>
            </div>
            <div class="w3-padding-4 w3-center">
                <a onclick="game_add_question()" class="game-add-question-btn w3-btn w3-teal">Thêm câu hỏi</a>
            </div>
        </div>
        <div class="game-right w3-twothird">
            <div id="game-add-question-form">
                <header class="w3-center w3-padding-4">
                    <label>Thêm câu hỏi</label>
                </header>
                <div class="w3-row w3-padding">
                    <label class="w3-col l2">Tên câu hỏi</label><input id="add_crossword_name" type="text" class="game-text w3-light-grey w3-col l10" />
                </div>
                <div class="w3-row w3-padding">
                    <div class="w3-col w3-col l5 w3-row">
                        <label class="w3-quarter">Số hàng</label><input type="number" min="1" max="25" id="game-apb-table-row-number" class="game-text w3-light-grey w3-col l8" />
                    </div>
                    <div class="w3-col w3-col l5 w3-row">
                        <label class="w3-quarter">Số cột</label><input type="number" min="1" max="25" id="game-apb-table-col-number" class="game-text w3-light-grey w3-col l8" />
                    </div>
                    <div class="w3-col l2">
                        <a class="game-create-alphabets-table-btn w3-btn w3-teal w3-right">Tạo ô chữ</a>
                    </div>
                </div>
                <div id="game_add_primary_hor" class="w3-hide"></div>
                <div id="game-apb-table-add-vertical" class="game-apb-table-add-vertical w3-row w3-padding">
                    <label class="w3-col l2">Câu hỏi chính</label><textarea id="add_primary_question_crossword" placeholder="Nhập câu hỏi hàng dọc" class="game-add-vertical-area game-text w3-light-grey w3-col l8"></textarea><a onclick="game_done_vertical()" class="game-apb-table-done-vertical-btn w3-col l2 w3-btn w3-teal">Xong</a>
                </div>
                <div class="w3-padding">
                    <div id="game-apb-table-box" class="w3-center w3-padding w3-border w3-border-light-grey">
                        <div id="game-apb-table-tutorial" class="w3-padding-64 w3-light-grey">
                            <p class="w3-large w3-text-grey">Nhập vào số hàng và số cột lớn hơn 0 để tạo ô chữ</p>
                            <i class="w3-xxlarge fa fa-table w3-text-grey"></i>
                        </div>
                    </div>
                </div>
                <div id="game-apb-table-add-horizol" class="game-apb-table-add-horizol w3-row w3-padding">
                    <label class="w3-col l2">Câu hỏi hàng ngang</label><textarea placeholder="Nhập câu hỏi hàng ngang" class="game-add-horizol-area game-text w3-light-grey w3-col l6"></textarea><a onclick="game_done_add_horizol()" class="game-apb-table-done-vertical-btn w3-btn w3-teal w3-col l2">Xong</a><a onclick="game_cancel_add_horizol()" class="game-apb-table-cancel-horizol-btn w3-btn w3-deep-orange w3-col l2">Huỷ</a>
                </div>
                <div class="w3-padding w3-center">
                    <a onclick="btn_add_crossword()" class="w3-btn w3-teal"><i class="fa fa-check"></i>&nbsp;Xác nhận</a>
                </div>
            </div>
            <div id="game-edit-question-form" class="game-edit-question-form">
                
            </div>
        </div>
    </div>
</body>
</html>
